
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title>
<script type="text/javascript" src="__ROOT__/js/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function () {
		$("#btnSearchShow").click(function () {
			$("#btnSearch").click();
		});
	});



function delArticle(id){
	
	if(confirm('确定要删除吗'))
	{
		$.ajax({  
					type: "post",  
					url: "ajaxKnowledge_del",  
					dataType: 'json',
					data: {'id':id},
					beforeSend: function(XMLHttpRequest){   
					},  
					error:function(){
						alert('error delArticle');
					},
					async : false,
					success: function(json)
					{
						
						if(json.data == 1){
							alert(json.info);
						} else
						{
							alert('wrong3!');
						}
					} 
				})
	}else
	{
		return false;
	}
	
}	
	
</script>
</head>
<body>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>

  <!--顶部+导航开始-->
<include file="./top" />
  <!--顶部+导航结束-->
    
    
    <!--内容开始-->
    <div id="content">
        <!--项目大标题-->
        <div id="content-header">
            <h1>
                知识管理</h1>
        </div>
        <!--主体内容区域开始-->
        <div id="content-container">
            <div class="row">
                <!--选项卡导航开始-->
                <div class="col-md-12">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#">知识列表</a> </li>
                        <li class=""><a href="__URL__/knowledge_add">添加文章</a> </li>                        
                    </ul>
                </div>
                <!--选项卡导航结束-->
                <!--主体内容开始-->
                <div class="col-md-12">
                    <div class="dataTables_wrapper" role="grid">
    <!--查询表单开始-->
    <form method="post" action="__ACTION__">
                        <div style="width: 98%; margin: auto; display: block; padding: 15px 35px 10px 20px;"
                            class="row dt-rt pricing-plan promoted">
                            <div class="col-sm-12 form-group">
                                <div class="col-md-3" style="padding-left: 0;">
                                    <label class="col-md-3" style="padding: 0">
                                        类别</label>
                                    <div class="col-md-8">
                                        <select name="typeid" id="dropType" class="form-control">
	<option value="-1">全部</option>
	<?php foreach ($type as $k=>$v){?>
	<option value="<?php echo $v['id']?>"><?php echo $v['typename']?></option>
	<?php }?>
</select>
                                    </div>
                                </div>
                                <div class="col-md-3" style="padding-left: 0;">
                                    <label class="col-md-3" style="padding: 0">
                                        标题</label>
                                    <div class="col-md-8">
                                        <input name="txtTitle" type="text" id="txtTitle" placeholder="查询主题" class="form-control" />
                                    </div>
                                </div>
                               <!-- <div class="col-md-5 form-group">
                                    <label class="col-md-2">
                                                                                                  日期</label>
                                    <div class="input-group date form_date col-md-5" style="float: left; padding: 0 2px 0 10px">
                                        <input name="txtStartTime" type="text" id="txtStartTime" class="form-control" placeholder="起始日期" />
                                        <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                    </div>
                                    <div class="input-group date form_date col-md-5" style="float: left; padding: 0 10px 0 2px">
                                        <input name="txtEndTime" type="text" id="txtEndTime" class="form-control" placeholder="截止日期" />
                                        <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                    </div>
                                </div>-->
                                <div class="col-md-1 text-right" style="padding-right: 0">
                                    <button type="button" class="btn btn-primary" id="btnSearchShow">
                                        <i class="glyphicon glyphicon-search"></i> 查 询</button>
                                </div>
                                <div style="display: none">
                                    <input type="submit" name="btnSearch" value="" id="btnSearch" />
                                </div>
                            </div>
                        </div>
                        </form>
                        <!--查询表单结束-->
                     
                        <!--列表开始-->
                        
                                <table class="table table-bordered table-highlight table-striped table-hover">
                                    <tr>
                                        <th width="70">
                                           <a href="__ROOT__/Admin/Know/knowledge_lst/ow/listorder" target=""> 排序</a>
                                        </th>
                                        <th width="120">
                                            <a href="__ROOT__/Admin/Know/knowledge_lst/ow/typeid" target="">类别</a>
                                        </th>
                                        <th>
                                            标题
                                        </th>
                                        <th width="100">
                                          <a href="__ROOT__/Admin/Know/knowledge_lst/ow/personshow" target=""> 作者</a>
                                        </th>
                                        <th width="80">
                                           <a href="__ROOT__/Admin/Know/knowledge_lst/ow/addtime" target=""> 添加时间</a>
                                        </th>

                                        <th width="40">
                                            <a href="__ROOT__/Admin/Know/knowledge_lst/ow/flag" target="">是否审核</a>
                                        </th>
                                         <th width="40">
                                            <a href="__ROOT__/Admin/Know/knowledge_lst/ow/istop" target="">是否置顶</a>
                                        </th>
                                        <th width="100">
                                            管理
                                        </th>
                                    </tr>
                                    
		<?php foreach ($data as $k => $v):?>
		<tr>
			<td><?php echo $v['listorder'];?></td>
			<td><?php echo $v['typename'];?></td>
			<td><a href="__APP__/Pc/Know/knowledgeCont/id/<?php echo $v['id'];?>" target="_blank"><?php echo $v['title'];?></a></td>
			<td><?php echo $v['personshow'];?></td>
            <td><?php echo $v['addtime'];?></td>
            <td><?php echo $v['flag'];?></td>
            <td><?php echo $v['istop'];?></td>
			<td><a href="__URL__/knowledge_edit/id/<?php echo $v['id'];?>">修改 </a>
			<?php if ($v['id'] != 1): ?>
			<a onClick="delArticle(<?php echo $v['id'];?>);" href="">删除</a></td>
			<?php endif?>
		</tr>
		<?php endforeach;?>

                                </table>
                            
                        <!--列表结束-->
                        <!--条目统计/翻页开始-->
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="dataTables_paginate paging_bootstrap">
                                    <!--分页开始-->
                                    <?php echo $pagestr;?>
                                    <!--分页结束-->
                                </div>
                            </div>
                        </div>
                        <!--条目统计/翻页结束-->
                    </div>
                </div>
                <!--主体内容结束-->
            </div>
        </div>
        <!--主体内容区域结束-->
    </div>
    <!--内容结束-->
    <!--底部信息开始-->
<include file="./foot" />


    <!--底部信息结束-->
    </form>
</body>
</html>
